/*
 * Copyright (c) 2010 CCX(China) Co.,Ltd. All Rights Reserved.
 *
 * This software is the confidential and proprietary information of
 * CCX(China) Co.,Ltd. ("Confidential Information").
 * It may not be copied or reproduced in any manner without the express 
 * written permission of CCX(China) Co.,Ltd.
 *
 * Author: zhnb
 * Date: 2011-8-10 下午03:26:05
 */
package ccxe.util.properties;

import java.io.IOException;
import java.io.InputStream;
import java.io.Serializable;
import java.util.Properties;

/**
 * 配置文件读取器（docDemoJxl.properties）
 * 
 * @author zhnb
 * 
 */
public class DocDemoJxlProperties implements Serializable {

    private static final long serialVersionUID = 8567450721000024563L;

    // 属性集
    private static Properties _properties = null;

    /**
     * 获取属性文件对象
     * 
     * @return
     */
    public static Properties getProperties() {
        return _properties;
    }

    // 初始化时直接实例化 “_properties”
    static {
        _properties = new Properties();

        ClassLoader classLoader = DocDemoJxlProperties.class.getClassLoader();
        InputStream inStream = classLoader
                .getResourceAsStream("docDemoJxl.properties");

        try {
            _properties.load(inStream);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
